Optimal. Leaf size=86 \[ \frac{a^2 \sin (c+d x)}{d}-\frac{(a-b)^2 \sin ^7(c+d x)}{7 d}+\frac{(a-b) (3 a-b) \sin ^5(c+d x)}{5 d}-\frac{a (3 a-2 b) \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0804554, antiderivative size = 86, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {3676, 373} \[ \frac{a^2 \sin (c+d x)}{d}-\frac{(a-b)^2 \sin ^7(c+d x)}{7 d}+\frac{(a-b) (3 a-b) \sin ^5(c+d x)}{5 d}-\frac{a (3 a-2 b) \sin ^3(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3676
Rule 373
Rubi steps
\begin{align*} \int \cos ^7(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \left (1-x^2\right ) \left (a-(a-b) x^2\right )^2 \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2-a (3 a-2 b) x^2+\left (3 a^2-4 a b+b^2\right ) x^4-(a-b)^2 x^6\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{a^2 \sin (c+d x)}{d}-\frac{a (3 a-2 b) \sin ^3(c+d x)}{3 d}+\frac{(a-b) (3 a-b) \sin ^5(c+d x)}{5 d}-\frac{(a-b)^2 \sin ^7(c+d x)}{7 d}\\ \end{align*}
Mathematica [A] time = 0.366442, size = 77, normalized size = 0.9 \[ \frac{21 \left (3 a^2-4 a b+b^2\right ) \sin ^5(c+d x)+105 a^2 \sin (c+d x)-15 (a-b)^2 \sin ^7(c+d x)-35 a (3 a-2 b) \sin ^3(c+d x)}{105 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.056, size = 153, normalized size = 1.8 \begin{align*}{\frac{1}{d} \left ({b}^{2} \left ( -{\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{3} \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{7}}-{\frac{3\,\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{35}}+{\frac{ \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{35}} \right ) +2\,ab \left ( -1/7\,\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{6}+1/35\, \left ( 8/3+ \left ( \cos \left ( dx+c \right ) \right ) ^{4}+4/3\, \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) \right ) +{\frac{{a}^{2}\sin \left ( dx+c \right ) }{7} \left ({\frac{16}{5}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{6}+{\frac{6\, \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{5}}+{\frac{8\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{5}} \right ) } \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.09244, size = 109, normalized size = 1.27 \begin{align*} -\frac{15 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \sin \left (d x + c\right )^{7} - 21 \,{\left (3 \, a^{2} - 4 \, a b + b^{2}\right )} \sin \left (d x + c\right )^{5} + 35 \,{\left (3 \, a^{2} - 2 \, a b\right )} \sin \left (d x + c\right )^{3} - 105 \, a^{2} \sin \left (d x + c\right )}{105 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.52151, size = 231, normalized size = 2.69 \begin{align*} \frac{{\left (15 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{6} + 6 \,{\left (3 \, a^{2} + a b - 4 \, b^{2}\right )} \cos \left (d x + c\right )^{4} +{\left (24 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 48 \, a^{2} + 16 \, a b + 6 \, b^{2}\right )} \sin \left (d x + c\right )}{105 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]